package com.lianxi

/**
  * Created by adengdeng on 2017/8/4 
  */
object Lx2 {

  def main(args: Array[String]): Unit = {
    val x: Int = 3
    //计算3的平方根。 def sqrt(x: Double): Double  这里发生隐式转换Int变Double
    val y = math.sqrt(x)
    val z = y * y
    val diff = x - z
    println("y:" + y + " z:" + z + " diff:" + diff)
  }
}
